<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <title>{:site('site_title')}</title>
    <link rel="stylesheet" href="__STATIC__/js/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="__STATIC__/js/editor_md/css/editormd.min.css"/>
    <link rel="stylesheet" href="__STATIC__/css/doc.css"/>
</head>
<body>
<div class="wrapper">
    <div id="sidebar" class="sidebar">
        {php $doc=widget('doc')->get($doc_id)}
        <div class="sidebar-heading"><a href="{:url('index/index')}" class="hidden-xs">文档 - </a><a href="{:url('md/index',['id'=>$doc['start_id']])}">{$doc.title}</a></div>
        {php $dirs=widget('doc_dir')->get($doc_id)}
        <ul class="nav nav-sidebar">
            {foreach $dirs as $id=>$title}
            <li><a href="{:url('md/index', ['id'=>$id])}">{$title}</a></li>
            {/foreach}
        </ul>
    </div>
    <div class="main">
        <div class="container-fluid">
            <button id="sidebarToggle" class="btn">
                <span></span>
                <span></span>
                <span></span>
            </button>